package com.tencent.wxcloudrun.vos;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class PageVO<R> {

    /**
     * 当前页码
     */
    private long pageNum;
    /**
     * 每页数量
     */
    private long pageSize;
    /**
     * 记录总数
     */
    private long total;
    /**
     * 数据模型
     */
    private List<R> records;

    public PageVO(long pageNum, long pageSize, long total, List<R> records) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.total = total;
        this.records = records;
    }
    public PageVO() {
        this.pageNum = 0;
        this.pageSize = 0;
        this.total = 0;
        this.records = new ArrayList<>();
    }
}
